//
//  TestCollectionViewWaterFlowLayout.h
//  MKUITestApp
//
//  Created by 苏尚进 on 2023/2/27.
//  Copyright © 2023 moon. All rights reserved.
//

#import "ViewControllerBase.h"
#import <MKUI/MKUI.h>
#import "Menu.h"
#import "TestFunButton.h"
#import "MenuCollectionViewCellModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface TestCollectionViewWaterFlowLayout : ViewControllerBase

@end


@class TestItemsSectionModel;
@interface TestItemsCollectionViewModel : MKUICollectionViewModel
@property(nonatomic,strong,nullable) TestItemsSectionModel *selectedSectionModel;
@property(nonatomic,strong,nullable) MenuCollectionViewCellModel *selectedCellModel;
@property(nonatomic,copy) void(^whenDataChange)(void);
@end
@interface TestItemsSectionModel : MKUICollectionViewWaterFlowLayoutTitleSupplementarySectionModel
@property(nonatomic,assign) BOOL selected;
@property(nonatomic,assign) BOOL expends;
@property(nonatomic,assign) NSInteger maxLine;
@property(nonatomic,assign) BOOL showLastLineItemWithinMaxLine;
@property(nonatomic,assign) UIEdgeInsets sectionInsets;
@end

//单元格视图
@interface TestItemCollectionViewCell : MenuCollectionViewCellBase<MKUICollectionViewWaterFlowLayoutCellProtocol>
@property(nonatomic,strong) UILabel *titleLabel;
@property(nonatomic,strong) MKUIFlowLayoutConstraint *flowlayout;
@end

//分组的头部、尾部视图
@interface TestItemsSectionView : MKUICollectionViewTitleSupplementaryView
@property(nonatomic,strong) TestFunButton *addButton;
@property(nonatomic,strong) TestFunButton *deleteButton;
@property(nonatomic,strong) MKUISegmentFlowLayoutConstraint *flowlayout;
@property(nonatomic,strong,nullable) TestItemsSectionModel *itemsSectionModel;
@end

//分组最后一行末尾的“展开/折叠”视图
@interface TestItemLastLineItemView : MKUICollectionViewSupplementaryView<MKUICollectionViewWaterFlowLayoutLastLineItemSupplementaryProtocol>
@property(nonatomic,strong) TestFunButton *expendButton;
@property(nonatomic,strong,nullable) TestItemsSectionModel *itemsSectionModel;
@end


NS_ASSUME_NONNULL_END
